from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

driver=webdriver.Edge()
driver.maximize_window()
driver.get('https://v.ifeng.com/')
sleep(5)

#点击登录
driver.find_element(By.XPATH,'//*[@id="root"]/div/div[1]/div[2]/div/span[2]').click()
sleep(5)

#进入框架
frname=driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/iframe')
driver.switch_to.frame(frname)
sleep(5)

#点击账号密码登录
driver.find_element(By.XPATH,'//*[@id="root"]/div/div[2]/div[1]/div[1]/span[1]').click()
sleep(2)

#输入账号
driver.find_element(By.ID,'text').send_keys('17733058407')
sleep(2)

#输入密码
driver.find_element(By.NAME,'password').send_keys('Li10140910')
sleep(30)

#点击登录
driver.find_element(By.XPATH,'//*[@id="root"]/div/div[2]/div[1]/div[2]/div[2]').click()
sleep(2)